import http from "@/utils/http";
import { AxiosRequestConfig } from "axios";

export interface GetBySize_ {
  /**
   * @description size
   */
  size: number;
}

export class TopSearchMetrics {
  /**
   * 查询用户热搜词记录
   *
   * @tags 热搜关键词controller
   * @request GET: /top-search-keyword/{size}
   * @secure
   */
  getBySize = ({ size }: { size: number } | GetBySize_, params: AxiosRequestConfig = {}) =>
    http.request<defs.ResponseEntityListTopSearchMetricsVO>({
      url: `/top-search-keyword/${size}`,
      method: "GET",
      ...params,
    });
}

export default new TopSearchMetrics();
